home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 114 / macaddict114.cdr / Software / Utilities / macam.0.8.4.dmg / macam sources / driver_core / MyCameraInfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-24  |  2.5 KB  |  80 lines

  1. /*
  2.  macam - webcam app and QuickTime driver component
  3.  Copyright (C) 2002 Matthias Krauss (macam@matthias-krauss.de)
  4.  
  5.  This program is free software; you can redistribute it and/or modify
  6.  it under the terms of the GNU General Public License as published by
  7.  the Free Software Foundation; either version 2 of the License, or
  8.  (at your option) any later version.
  9.  
  10.  This program is distributed in the hope that it will be useful,
  11.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  GNU General Public License for more details.
  14.  
  15.  You should have received a copy of the GNU General Public License
  16.  along with this program; if not, write to the Free Software
  17.  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  $Id: MyCameraInfo.h,v 1.2 2003/02/24 13:02:13 mattik Exp $
  19.  */
  20.  
  21. /*
  22. This is a container class. It serves multiple organizing purposes:
  23.  
  24. MyCameraCentral keeps an object for each available driver.
  25. MyCameraCentral uses these objects as refCon for the attach/detach-callbacks (to have the kind of camera handy)
  26. MyCameraCentral keeps an object for each connected camera and sets the driver object to remember if the camera is actually used
  27. */
  28.  
  29. #include <CoreFoundation/CoreFoundation.h>
  30. #include <IOKit/IOKitLib.h>
  31. #include <IOKit/IOMessage.h>
  32. #include <IOKit/IOCFPlugIn.h>
  33. #include <IOKit/usb/IOUSBLib.h>
  34. #include "GlobalDefs.h"
  35. #import <Cocoa/Cocoa.h>
  36.  
  37. @interface MyCameraInfo : NSObject {
  38.     io_object_t        notification;    //A reference to our notification we want when we are unplugged
  39.     Class        driverClass;    //The driver class if we want a driver
  40.     id            driver;        //A driver - if we have one
  41.     unsigned long     cid;        //Our runtime unique id - generated on init
  42.     id            central;    //for the callbacks to find the camera central 
  43.     NSString*        name;        //the name of the camera type (e.g. "Philips ToUCam Pro")
  44.     long         pid;        //the usb product id
  45.     long         vid;        //the usb vendor id
  46.     UInt32        lid;        //The usb location id (only for connected cameras)
  47. }
  48.  
  49. - (id) init;
  50. - (void) dealloc;
  51. - (id) copy;
  52.  
  53. - (io_object_t) notification;
  54. - (void) setNotification:(io_object_t)n;
  55.  
  56. - (Class) driverClass;
  57. - (void) setDriverClass:(Class)c;
  58.  
  59. - (id) driver;
  60. - (void) setDriver:(id)d;
  61.  
  62. - (id) central;
  63. - (void) setCentral:(id)c;
  64.  
  65. - (unsigned long) cid;
  66.  
  67. - (NSString*) cameraName;
  68. - (void) setCameraName:(NSString*)camName;
  69.  
  70. - (long) productID;
  71. - (void) setProductID:(long)prodID;
  72.  
  73. - (long) vendorID;
  74. - (void) setVendorID:(long)vendID;
  75.  
  76. - (UInt32) locationID;
  77. - (void) setLocationID:(UInt32)locID;
  78.  
  79. @end
  80.